package com.ruoyi.goodsAct.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.goodsAct.mapper.GoodsActMapper;
import com.ruoyi.goodsAct.domain.GoodsAct;
import com.ruoyi.goodsAct.service.IGoodsActService;
import com.ruoyi.common.core.text.Convert;

/**
 * 商品活动 服务层实现
 * 
 * @author zuo min
 * @date 2019-08-08
 */
@Service
public class GoodsActServiceImpl implements IGoodsActService 
{
	@Autowired
	private GoodsActMapper goodsActMapper;

	/**
     * 查询商品活动信息
     * 
     * @param actId 商品活动ID
     * @return 商品活动信息
     */
    @Override
	public GoodsAct selectGoodsActById(Integer actId)
	{
	    return goodsActMapper.selectGoodsActById(actId);
	}
	
	/**
     * 查询商品活动列表
     * 
     * @param goodsAct 商品活动信息
     * @return 商品活动集合
     */
	@Override
	public List<GoodsAct> selectGoodsActList(GoodsAct goodsAct)
	{
	    return goodsActMapper.selectGoodsActList(goodsAct);
	}
	
    /**
     * 新增商品活动
     * 
     * @param goodsAct 商品活动信息
     * @return 结果
     */
	@Override
	public int insertGoodsAct(GoodsAct goodsAct)
	{
	    return goodsActMapper.insertGoodsAct(goodsAct);
	}
	
	/**
     * 修改商品活动
     * 
     * @param goodsAct 商品活动信息
     * @return 结果
     */
	@Override
	public int updateGoodsAct(GoodsAct goodsAct)
	{
	    return goodsActMapper.updateGoodsAct(goodsAct);
	}

	/**
     * 删除商品活动对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteGoodsActByIds(String ids)
	{
		return goodsActMapper.deleteGoodsActByIds(Convert.toStrArray(ids));
	}
	
}
